/**
 * 战术装备相关类型定义
 */

// 装备项基本信息
export interface TacticalItem {
  object_id: number;
  object_name: string;
  category_id: number;
  grade: number;
  pic: string;
  current_price: number;
  formatted_price?: string;
  price_24h_ago: number;
  price_change_24h: number;
  price_change_percent: number;
  has_price_data: boolean;
  primary_class: string;
  second_class_cn: string;
  desc: string;
  weight: number;
  length: number;
  width: number;
}

// 装备配置新数据结构
export interface TacticalLoadout {
  weapon: [string, string, number] | null; // [ItemInfo字符串, PriceData字符串, 价格数值]
  accessories: Array<[string, string, number]>; // 配件数组
  helmet: [string, string, number] | null; // 头盔
  armor: [string, string, number] | null; // 护甲
  backpack: [string, string, number] | null; // 背包
  chest_rig: [string, string, number] | null; // 胸挂
  total_cost: number; // 总成本
  budget_ratio: number; // 预算比例
  within_target: boolean; // 是否在目标范围内
  style: string; // 风格
}

// 战术装备数据
export interface TacticalLoadoutData {
  map_context: {
    map_id: string;
    map_name: string;
    map_name_en: string;
    level_name: string;
    budget: number;
    description: string;
  };
  loadouts: TacticalLoadout[];
  generated_at: string;
  total_count: number;
}

// API响应数据
export interface TacticalLoadoutResponse {
  key: string;
  map_id: string;
  level: string;
  data: TacticalLoadoutData;
}

// 筛选条件
export interface TacticalFilter {
  map_id: string;
  level: string;
  formatted: boolean;
}

// 地图信息
export interface MapInfo {
  id: string;
  name: string;
  levels: string[];
}

// 等级信息
export interface LevelInfo {
  id: string;
  name: string;
  description?: string;
}